<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
$('#tt').tabs({
    border:false,
    onSelect:function(title){
		alert(title+' is selected');
    }
});

function tables(ll){
 	$('.szsj_biaoge').datagrid({    
 		//数据源地址
 		url:'shengzhishijuanchaxun',
 		queryParams:{
 			outname:ll
 		},
	    columns:[[
	    	{field:'OUTNAME',fixed:false,width:140,title:'试卷名称',align:'center'},    
	        {field:'QSBBANK',fixed:false,width:140,title:'题库',align:'center'}, 
	        {field:'OUTZONF',fixed:false,width:140,title:'总分',align:'center'},
	        {field:'EMPNAME',fixed:false,width:140,title:'出卷人',align:'center'}
	    
	    ]],
	    pagination:true,
	    pageNumber:1,
	    pageSize:5,
	    pageList:[5,10,15]      
	});

}

function szsj_chakan(){
	adds("考试试卷","tyl/shi-juan");
}
  function shengzhishijuansousuo(value,name){
         tables(value);
}
  $(function(){
	  tables(null);
	  
	 	$(".zpsj_xianshi").click(function(){
	 		tables();
	 	})
	  	
 })
 	 $(".szsj_xinzeng").click(function(){
			var text='新增试卷';
			var url="tyl/shi-juan-xin-zeng";
			add(text,url)
		
		
	});
 function add(text,url){
	if(url!=undefined){
		$('#tit').tabs('add',{
			id: 'tit1',
			title: text,
			closable: true,
			href: "http://localhost:8080/"+url
		});
	
	} 
	
}



</script>

				<div class="shengzhishijuan_zong">
				
				    <div class="shengzhishijuan_shang">
				              <div class="szsj_tongguo">
				                  <button class="szsj_xinzeng">新增试卷</button>

				              </div>
				              <div class="szsj_xiangqing">
                                  <input id="ss" class="easyui-searchbox" style="width:300px" data-options="searcher:shengzhishijuansousuo,prompt:'请输入需要查询的试卷名称'"></input>		              			              			              
				              </div>
				    </div> 
				    <div class="shengzhishijuan_xia">
				             <table class="szsj_biaoge" class="easyui-datagrid" style="width:100%;height:350px;margin-top:20px;" data-options="fitColumns:true">
                                  
                            </table>
				    </div>
				</div>
</body>
</html>